Running the Agent in Command Line Mode (DAI Run Agent)
The DAI Run Agent runs at a command line without a graphical user interface (GUI). Thus, you can launch a Run Agent from a batch or shell script, or from within a container. You can also customize how a Run Agent operates by passing arguments with the Run Agent command at the command line. Information about how to use the Run Agent command and available options are provided below.
To use the Run Agent command, follow these steps:
-
From the command prompt, navigate to the agent directory. For example:
- For Windows:
C:\Program Files (x86)\eggplantDAIRunAgent\
- For Mac:
/Applications
- For Linux: (The path in which your
eggplantDAIRunAgent
executable is extracted to)
- For Windows:
-
Run the agent executable, and add the appropriate arguments:
- For Windows:
eggplantDAIRunAgent.exe [arguments]
- For Mac:
./eggplantDAIRunAgent [arguments]
- For Linux:
./eggplantDAIRunAgent [arguments]
- For Windows:
Using DAI Run Agent Command Line Arguments
You can specify how your DAI Run Agent operates by passing arguments with the Run Agent command at the command line. Each argument is preceded with two, concatenated dashes, like this: --argument_name
. For a full list of DAI Run Agent arguments and how to use them, see Run Agent Command Help or Table of Run Agent Command Line Arguments below. Examples of Run Agent commands are also provided below.
When the DAI Run Agent starts, it also starts an Eggplant Functional (EPF) instance in command-line mode, which is without its GUI. This is also known as the Fusion Engine. The Fusion Engine actually runs the DAI snippets. You can specify options you want this Fusion Engine to run with along with your Run Agent command. See Passing Eggplant Functional Command-Line Arguments with the Run Agent Command below for more information.
Simple Example of Running the DAI Run Agent
You can launch a fully-configured DAI Run Agent with the simple command shown below when you specify the path to an existing DAI environment .ini
file that is downloaded to your system. For more information about DAI .ini
files, see How to create a DAI Environment.
Windows:
In a CMD shell or PowerShell on Windows systems:
“C:\Program Files (x86)\eggplantDAIRunAgent\eggplantDAIRunAgent.exe” --ini-file "C:\Users\myuser\my_env.ini"
Mac/Linux:
In a bash shell terminal on a Mac or Linux-based systems:
./eggplantDAIRunAgent --ini-file "my envs/my_env.ini"
Where:
"C:\Program Files (x86)\eggplantDAIRunAgent\eggplantDAIRunAgent.exe"
is the DAI Run Agent command on Windows and./eggplantDAIRunAgent
is the DAI Run Agent command on Mac and Linux.--ini-file C:\Users\myuser\my_env.ini
on Windows and--ini-file "my envs/my_env.ini
on Mac or Linux are the DAI Run Agent arguments for the DAI.ini
file and value, which is the.ini
file location. The.ini
file location is arbitrary. Specify the location where the file is saved on your system.
On Mac, Linux and Windows, if the path to your DAI .ini
file contains spaces, you must enclose it in quotes as shown in the Mac/Linux example above.
Also, if your DAI .ini
file contains more than one environment
section you must provide the --host-url
and --env-id
arguments and values along with the --ini-file
argument in your Run Agent command. You cannot use the syntax as shown in the simple example above.
Other Examples for the DAI Run Agent
Following are examples of how to run the DAI Run Agent on different operating systems with more verbose, but optional, arguments. See Run Agent Command Help or the Table of Run Agent Command Line Arguments below for a list of available arguments.
Windows:
In a CMD shell or PowerShell on Windows systems:
“C:\Program Files (x86)\eggplantDAIRunAgent\eggplantDAIRunAgent.exe” --ini-file "C:\Users\myuser\my_env.ini" --log-level INFO --drive-port 5401